my $text = "TCP(Transmission Control Protocol)/IP(Internet Protocol)"; print join "\n", (split /([^\s\(\)]+\(|\))/, $text);